<form method="post">
材质分类： <?php echo $this->characterTag($this->level0,$this->checkLevel0,0)?><br/>
特征描述： <?php echo $this->characterTag($this->level1,$this->checkLevel1,1)?><br/>
是否镶嵌： <?php echo $this->characterTag($this->level2,$this->checkLevel2,2)?><br/>
题材: <?php echo $this->characterTag($this->level3,$this->checkLevel3,3)?><br/>
用途分类： <?php echo $this->characterTag($this->level4,$this->checkLevel4,4)?><br/>
<input type="submit">
</form>
<form>
<h1>temp taobao list</h1>
<?php if (count($this->paginator)): ?>
<table>
<?php foreach ($this->paginator as $item): ?>
  <tr>
	<td>
		<img alt="" src="<?php echo $item['pic_url']; ?>" width="250px" height="250px" />
	</td>
	<td>
		<p>名称：<a href="<?php echo $item['click_url']?>"><?php echo $item['title']?></a></p>
		<p>价格：<?php echo $item['price']?> </p>
		<?php if(1==$item['is_promotion']){?>
		<p>促销名称：<?php echo $item['promotion_name']?>&nbsp;促销价格：<?php echo $item['promotion_price']?>促销结束时间：<?php echo $item['promotion_end_time']?></p>
		<?php }?>
		<?php if(1==$item['is_taobaoke']){?>
		<p>淘宝客商品</p>
		<?php }?>
		<?php if(1==$item['is_onsale']){?>
		<p>在线销售商品</p>
		<?php }?>
	</td>
	<td width="200px"><a>编辑</a><br/>
	<a>更新</a><br/>
	<a>删除</a><br/>
	<input type="radio" name="<?php echo $item['num_iid']?>" <?php if(0==$item['show_level']){?>checked="checked" <?php }?>  onclick="showLevelConfirm(0,<?php echo $item['num_iid']?>)"/>首页
	<input type="radio" name="<?php echo $item['num_iid']?>" <?php if(1==$item['show_level']){?>checked="checked" <?php }?>  onclick="showLevelConfirm(1,<?php echo $item['num_iid']?>)"/>二级页
	<input type="radio" name="<?php echo $item['num_iid']?>" <?php if(2==$item['show_level']){?>checked="checked" <?php }?>  onclick="showLevelConfirm(2,<?php echo $item['num_iid']?>)"/>默认
	<input type="radio" name="<?php echo $item['num_iid']?>" <?php if(3==$item['show_level']){?>checked="checked" <?php }?>  onclick="showLevelConfirm(3,<?php echo $item['num_iid']?>)"/>不显示
	</td>  	
  </tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<?php echo $this->paginationControl($this->paginator,
                                    'Sliding',
                                    'my_pagination_control.phtml'); ?>
</form>
<br /><br /><center>View script for controller <b>TaoBaoItems</b> and script/action name <b>listTempItems</b></center>
<script>
function showLevelConfirm(show_level,num_iid){
	var str="showLevel="+show_level+"&numIid="+num_iid;
	$.ajax({
		type: "GET",	
	  	url: "<?php echo $this->baseUrl(); ?>/admin/tao-bao-items/ajax-item-showlevel-change",
	  	data: str,
	  	success: success,
	  	error: error
	});
}



	function success(date){   
		alert(date);
	}
	function error(){
		alert("error");
	}
</script>
